CC = gcc
CFLAGS = -DDEBUG -O2 -g -Wall
LIBS = -lwpcap -lpacket -lws2_32 -liconv
INCLUDE_DIR = -Iinclude
LIB_DIR = -Llib

all:test main base64
	$(CC) main.o test.o base64.o -o pcapMain $(CFLAGS) $(LIB_DIR) $(LIBS)
base64:base64.cpp base64.h
	$(CC) -c base64.cpp $(CFLAGS) $(INCLUDE_DIR)
test:test.cpp test.h
	$(CC) -c test.cpp $(CFLAGS) $(INCLUDE_DIR)
main:main.cpp
	$(CC) -c main.cpp $(CFLAGS) $(INCLUDE_DIR)
.PHONY:clean
clean:
	rm *.o *.exe
